<?php
use think\Session;
use think\Request;
 

$adminInfo = Session::get('admin'); 
preg_match_all("/.*\.php\/.*\/(\w+?)\s?/Uis", $_SERVER['REQUEST_URI'],$checkUrl); 
if(!$adminInfo&&$checkUrl[1][0]!="login"){
    header("Location:".url('Index/login'));die; 
}
